public class PloyMethod {
    public static void main(String[] args) {
        A1 a1=new A1();
        System.out.println(a1.sum(10, 11));
        System.out.println(a1.sum(10, 11, 12));
    }
}


class A1{
//    方法的多态
    public int sum(int n1,int n2){
        return n1+n2;
    }
    public int sum(int n1,int n2,int n3){
        return n1+n2+n3;
    }
}